package com.fs.ibox.service.impl;

import com.fs.ibox.dao.CollectionDao;
import com.fs.ibox.pojo.Collection;
import com.fs.ibox.service.CollectionService;
import com.fs.ibox.util.BeanFactory;
import com.fs.ibox.vo.Search;

import java.util.List;

public class CollectionServiceimpl implements CollectionService {

    CollectionDao classifyDao = BeanFactory.createBean(CollectionDao.class);
    @Override
    public List<Collection> selectAll() {
        return classifyDao.queryAll();
    }

    @Override
    public void addcollection(Collection collection) {
        classifyDao.addCollection(collection);
    }

    @Override
    public List<Collection> selectById(int id) {
        return classifyDao.queryById(id);
    }

    @Override
    public void reviseByid(int id) {
        classifyDao.reviseByID(id);
    }

    @Override
    public List<Search> queryUserIdcoll(String keywords, String state,String username) {
        return classifyDao.queryUserIdcoll(keywords,state,username);
    }
}
